home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / amiga / fd2inlin.lha / fd2inline / bin / mandeps < prev   
Text File  |  1992-03-14  |  829b  |  50 lines

  1. #!c:sksh
  2.  
  3. # by WB
  4. # function to echo dependencies of infile/* to man:2/auto2/*
  5.  
  6. mandir=man
  7. inlinedir=inline
  8. protodir=proto
  9. fddir=fd
  10.  
  11.  
  12. for file in $mandir/*.doc
  13. do
  14.   if head $file | fgrep -s library/
  15.   then
  16.     echo $file
  17.   fi
  18. done >t:mandeps
  19.  
  20. bases=`
  21.   for i in $(cat t:mandeps)
  22.   do
  23.     Basename $i .doc
  24.   done
  25. `
  26. echo -n "ALL= "
  27. for base in $bases
  28. do
  29.   echo    "$inlinedir/$base.h \\"
  30.   echo    "$protodir/$base.h  \\"
  31. done
  32.  
  33. echo
  34. echo
  35. echo "$inlinedir/%.h: $protodir/%.h $fddir/%_lib.fd"
  36. echo "\tfd2inline $fddir/\$*_lib.fd $protodir/\$*.h >$inlinedir/\$*.h"
  37. echo
  38. echo "$protodir/%.h: $mandir/%.doc"
  39. echo "\t+auto2proto $mandir/\$\*.doc >$protodir/\$*.h"
  40. echo
  41. echo "all: $(ALL)"
  42. echo
  43.  
  44. for base in $bases
  45. do
  46.   echo      "$protodir/$base.h: $mandir/$base.doc"
  47.   echo -c "$inlinedir/$base.h: $protodir/$base.h $fddir/$base" "_lib.fd"
  48. done
  49.  
  50.